package com.ruoyi.common.core.utils.exptimpt.validator;

import com.ruoyi.common.core.domain.BaseExcel;
import com.ruoyi.common.core.utils.exptimpt.AbstractExImportStrategy;
import com.ruoyi.common.core.utils.exptimpt.ExImportHandlerChain;

import java.util.List;

/**
 * 业务校验(有业务校验需要重写对应ExImportStrategy的businessVerificationForImport方法)
 */
public class ValidatorChainForBusiness extends ExImportHandlerChain {

    @Override
    public <T extends BaseExcel> boolean handle(List<T> dataList, AbstractExImportStrategy<T> importStrategy) {
        importStrategy.businessVerificationForImport(dataList);
        return handleNext(dataList, importStrategy);
    }
}